Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

custom font to render clock applet #1358

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dnk
Copy link
Contributor

@dnk dnk commented Feb 19, 2023

use custom font to render clock applet.
configuration is available via gsettings/dconf-editor

example how it looks with vertical panel (panel width: 44, font:8 "DejaVu Sans", format: '24-hour'):
image

can be helpful for #1090 and #157

applets/clock/clock.c Outdated Show resolved Hide resolved
use custom font to render clock applet.
configuration is available via gsettings/dconf-editor
Copy link
Member

@zhuyaliang zhuyaliang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code format is good, the compilation runs well, and no memory leak is found

Copy link
Member

@lukefromdc lukefromdc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got this to build and run fine, but on killing the panel (so it could restart) and running my older version dconf-editor 3.18 I was not able to find any references to the clock schema (a relocatable one?) so wondering if this may depend on
#1355
to actually work. Will apply that on top of this change and see what happens

@lukefromdc
Copy link
Member

The changes here did not show up in dconf-editor after applying
#1355
rebuilding, restarting the pane, replacing my normal dconf-editor 3.18 with 3.36 (for relocatable schema support) and then opening dconf-editor.

Due to the relocatable schema issue, this might be more useful if custom formats can be applied from the clock preferences dialog as well

@L-U-T-i
Copy link

L-U-T-i commented Mar 24, 2023

Why do we need "use-custom-font" setting?

If "custom-font" is left default ("Use default value" ON), custom font is not in use. If we turn it OFF and enter custom font, we use that one instead.

I find this setting redundant, and even potentially misleading (as one is on top of the window, and another one at the bottom - so one can easily miss the bottom "use-custom-font" setting, believing custom font is chosen already by setting "custom-font").

I support the idea of custom font through the clock preferences dialog (possibly with a selectable list of fonts installed instead of text window).

" padding-top: 0px;\n"
" padding-bottom: 0px;\n"
" padding-left: 0px;\n"
" padding-right: 0px;\n"
Copy link
Member

@raveit65 raveit65 May 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why removing the padding for vertical panels?
I can't recall but there was a reason why we use the padding, many years ago.
For me it looks nicer with a padding. Using 2px seems OK for me.
Any way, i don't want to block it.
But this needs to be moved in a single commit.
Otherwise you will never find the change in git history, when user will blame us about.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And why adding the 2 blanks before padding-......?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

last time that i ask........

@raveit65
Copy link
Member

raveit65 commented May 1, 2023

It works on my box but having 2 gsettings keys for the same setting seems to be overloaded.
I am sure most people will forget to enable the setting explicit after choosing the font.
Edit:
I don't really block it , as i will never use a different font for myself. Too much options for a desktop :)

@lukefromdc
Copy link
Member

What is the status of this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants